#include "iostream"
using namespace std;
struct TreeNode{
  int val;
  TreeNode *left;
  TreeNode *right;
  TreeNode(int x):val(x),left(NULL),right(NULL){}
};
string serialize(TreeNode* root){
    string str="";
    str+=root->val;
    while(root->left!=NULL&&root->right!=NULL){
        str+=root->left->val;
        str+=root->right->val;
    }
}
TreeNode* deserialize(string data){

}